package de.gameduell.framework.gui.wrapper {
	import de.gameduell.framework.debug.Debug;	
	
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;	

	/**
	 * @author cbra
	 */
	public class DisplayObjectContainerWrapper extends InteractiveObjectWrapper {
		protected var _displayObjectContainer:DisplayObjectContainer;
		
		public function DisplayObjectContainerWrapper(aDisplayObjectContainer:DisplayObjectContainer) {
			super(aDisplayObjectContainer);
			_displayObjectContainer = aDisplayObjectContainer;
		}
		
		public function addChild(child:DisplayObject):DisplayObject{
			_displayObjectContainer.addChild(child);
			return child;
		}
		
		public function removeChildAt(index:int):DisplayObject{
			var child:DisplayObject = _displayObjectContainer.removeChildAt(index);
			return child;
		}
		
		public function removeChild(child:DisplayObject):DisplayObject{
			_displayObjectContainer.removeChild(child);
			return child;
		}
		
		public function getChildByName(name:String):DisplayObject{
			return _displayObjectContainer.getChildByName(name);
		}
		
		public function setChildIndex(child:DisplayObject,index:int):void{
			_displayObjectContainer.setChildIndex(child, index);
		}
				
		public function swapChildren(child1:DisplayObject, child2:DisplayObject):void{
			_displayObjectContainer.swapChildren(child1, child2);
		}
		
		public function getChildIndex(child:DisplayObject):int{
			return _displayObjectContainer.getChildIndex(child);
		}
		
		public function getChildAt(index:int):DisplayObject{
			return _displayObjectContainer.getChildAt(index);
		}
		
		public function contains(child:DisplayObject):Boolean{
			return _displayObjectContainer.contains(child);
		}
		
		public function set mouseChildren(aMouseChildren:Boolean):void{
			_displayObjectContainer.mouseChildren = aMouseChildren;
		}
		
		public function get numChildren():int{
			return _displayObjectContainer.numChildren;
		}
		
		public function get mouseChildren():Boolean{
			return _displayObjectContainer.mouseChildren;
		}
		
		public function get displayObjectContainer():DisplayObjectContainer{
			return _displayObjectContainer;
		}
		
		public function get mouseX():Number{
			return _displayObjectContainer.mouseX;
		}
		
		public function get mouseY():Number{
			return _displayObjectContainer.mouseY;
		}
		
	}
}
